package com.fixme4trade.domain;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;

@Entity
public class Image implements Serializable {
	
	private static final long serialVersionUID = 1L;

	@Id
	//@GeneratedValue
	@SequenceGenerator( name = "IMAGE_ID", sequenceName = "IMAGE_SEQ", allocationSize = 1 )  
	@GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "IMAGE_ID" )
	@Column(name="image_id")
	private long id;
	
	//@Lob
	//@Basic(fetch=FetchType.LAZY)
	//private byte[] imageBytes;
	private String imageDirectory;
	
	private String imageFileName;
	
	public Image() {
		
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getImageDirectory() {
		return imageDirectory;
	}

	public void setImageDirectory(String imageDirectory) {
		this.imageDirectory = imageDirectory;
	}

	public String getImageFileName() {
		return imageFileName;
	}

	public void setImageFileName(String imageFileName) {
		this.imageFileName = imageFileName;
	}

	public String getFullPath() {		
		return imageDirectory+"/"+imageFileName;
	}

}
